Optimal. Leaf size=136 \[ -\frac {\left (a^2+1\right ) \tanh ^{-1}(a+b x)^2}{2 b^2}+\frac {a \text {Li}_2\left (-\frac {a+b x+1}{-a-b x+1}\right )}{b^2}+\frac {\log \left (1-(a+b x)^2\right )}{2 b^2}-\frac {a \tanh ^{-1}(a+b x)^2}{b^2}+\frac {(a+b x) \tanh ^{-1}(a+b x)}{b^2}+\frac {2 a \log \left (\frac {2}{-a-b x+1}\right ) \tanh ^{-1}(a+b x)}{b^2}+\frac {1}{2} x^2 \tanh ^{-1}(a+b x)^2 \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.20, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 10, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {6111, 5928, 5910, 260, 6048, 5948, 5984, 5918, 2402, 2315} \[ \frac {a \text {PolyLog}\left (2,-\frac {a+b x+1}{-a-b x+1}\right )}{b^2}-\frac {\left (a^2+1\right ) \tanh ^{-1}(a+b x)^2}{2 b^2}+\frac {\log \left (1-(a+b x)^2\right )}{2 b^2}-\frac {a \tanh ^{-1}(a+b x)^2}{b^2}+\frac {(a+b x) \tanh ^{-1}(a+b x)}{b^2}+\frac {2 a \log \left (\frac {2}{-a-b x+1}\right ) \tanh ^{-1}(a+b x)}{b^2}+\frac {1}{2} x^2 \tanh ^{-1}(a+b x)^2 \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 260
Rule 2315
Rule 2402
Rule 5910
Rule 5918
Rule 5928
Rule 5948
Rule 5984
Rule 6048
Rule 6111
Rubi steps
\begin {align*} \int x \tanh ^{-1}(a+b x)^2 \, dx &=\frac {\operatorname {Subst}\left (\int \left (-\frac {a}{b}+\frac {x}{b}\right ) \tanh ^{-1}(x)^2 \, dx,x,a+b x\right )}{b}\\ &=\frac {1}{2} x^2 \tanh ^{-1}(a+b x)^2-\operatorname {Subst}\left (\int \left (-\frac {\tanh ^{-1}(x)}{b^2}+\frac {\left (1+a^2-2 a x\right ) \tanh ^{-1}(x)}{b^2 \left (1-x^2\right )}\right ) \, dx,x,a+b x\right )\\ &=\frac {1}{2} x^2 \tanh ^{-1}(a+b x)^2+\frac {\operatorname {Subst}\left (\int \tanh ^{-1}(x) \, dx,x,a+b x\right )}{b^2}-\frac {\operatorname {Subst}\left (\int \frac {\left (1+a^2-2 a x\right ) \tanh ^{-1}(x)}{1-x^2} \, dx,x,a+b x\right )}{b^2}\\ &=\frac {(a+b x) \tanh ^{-1}(a+b x)}{b^2}+\frac {1}{2} x^2 \tanh ^{-1}(a+b x)^2-\frac {\operatorname {Subst}\left (\int \frac {x}{1-x^2} \, dx,x,a+b x\right )}{b^2}-\frac {\operatorname {Subst}\left (\int \left (\frac {\left (1+a^2\right ) \tanh ^{-1}(x)}{1-x^2}-\frac {2 a x \tanh ^{-1}(x)}{1-x^2}\right ) \, dx,x,a+b x\right )}{b^2}\\ &=\frac {(a+b x) \tanh ^{-1}(a+b x)}{b^2}+\frac {1}{2} x^2 \tanh ^{-1}(a+b x)^2+\frac {\log \left (1-(a+b x)^2\right )}{2 b^2}+\frac {(2 a) \operatorname {Subst}\left (\int \frac {x \tanh ^{-1}(x)}{1-x^2} \, dx,x,a+b x\right )}{b^2}-\frac {\left (1+a^2\right ) \operatorname {Subst}\left (\int \frac {\tanh ^{-1}(x)}{1-x^2} \, dx,x,a+b x\right )}{b^2}\\ &=\frac {(a+b x) \tanh ^{-1}(a+b x)}{b^2}-\frac {a \tanh ^{-1}(a+b x)^2}{b^2}-\frac {\left (1+a^2\right ) \tanh ^{-1}(a+b x)^2}{2 b^2}+\frac {1}{2} x^2 \tanh ^{-1}(a+b x)^2+\frac {\log \left (1-(a+b x)^2\right )}{2 b^2}+\frac {(2 a) \operatorname {Subst}\left (\int \frac {\tanh ^{-1}(x)}{1-x} \, dx,x,a+b x\right )}{b^2}\\ &=\frac {(a+b x) \tanh ^{-1}(a+b x)}{b^2}-\frac {a \tanh ^{-1}(a+b x)^2}{b^2}-\frac {\left (1+a^2\right ) \tanh ^{-1}(a+b x)^2}{2 b^2}+\frac {1}{2} x^2 \tanh ^{-1}(a+b x)^2+\frac {2 a \tanh ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{b^2}+\frac {\log \left (1-(a+b x)^2\right )}{2 b^2}-\frac {(2 a) \operatorname {Subst}\left (\int \frac {\log \left (\frac {2}{1-x}\right )}{1-x^2} \, dx,x,a+b x\right )}{b^2}\\ &=\frac {(a+b x) \tanh ^{-1}(a+b x)}{b^2}-\frac {a \tanh ^{-1}(a+b x)^2}{b^2}-\frac {\left (1+a^2\right ) \tanh ^{-1}(a+b x)^2}{2 b^2}+\frac {1}{2} x^2 \tanh ^{-1}(a+b x)^2+\frac {2 a \tanh ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{b^2}+\frac {\log \left (1-(a+b x)^2\right )}{2 b^2}+\frac {(2 a) \operatorname {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-a-b x}\right )}{b^2}\\ &=\frac {(a+b x) \tanh ^{-1}(a+b x)}{b^2}-\frac {a \tanh ^{-1}(a+b x)^2}{b^2}-\frac {\left (1+a^2\right ) \tanh ^{-1}(a+b x)^2}{2 b^2}+\frac {1}{2} x^2 \tanh ^{-1}(a+b x)^2+\frac {2 a \tanh ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{b^2}+\frac {\log \left (1-(a+b x)^2\right )}{2 b^2}+\frac {a \text {Li}_2\left (1-\frac {2}{1-a-b x}\right )}{b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.28, size = 98, normalized size = 0.72 \[ \frac {\left (-a^2+2 a+b^2 x^2-1\right ) \tanh ^{-1}(a+b x)^2-2 a \text {Li}_2\left (-e^{-2 \tanh ^{-1}(a+b x)}\right )-2 \log \left (\frac {1}{\sqrt {1-(a+b x)^2}}\right )+2 \tanh ^{-1}(a+b x) \left (2 a \log \left (e^{-2 \tanh ^{-1}(a+b x)}+1\right )+a+b x\right )}{2 b^2} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.55, size = 0, normalized size = 0.00 \[ {\rm integral}\left (x \operatorname {artanh}\left (b x + a\right )^{2}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x \operatorname {artanh}\left (b x + a\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 365, normalized size = 2.68 \[ \frac {x^{2} \arctanh \left (b x +a \right )^{2}}{2}-\frac {\arctanh \left (b x +a \right )^{2} a^{2}}{2 b^{2}}+\frac {\arctanh \left (b x +a \right ) x}{b}+\frac {\arctanh \left (b x +a \right ) a}{b^{2}}-\frac {\arctanh \left (b x +a \right ) \ln \left (b x +a -1\right ) a}{b^{2}}+\frac {\arctanh \left (b x +a \right ) \ln \left (b x +a -1\right )}{2 b^{2}}-\frac {\arctanh \left (b x +a \right ) \ln \left (b x +a +1\right ) a}{b^{2}}-\frac {\arctanh \left (b x +a \right ) \ln \left (b x +a +1\right )}{2 b^{2}}+\frac {\ln \left (b x +a -1\right )}{2 b^{2}}+\frac {\ln \left (b x +a +1\right )}{2 b^{2}}-\frac {\ln \left (b x +a -1\right )^{2} a}{4 b^{2}}+\frac {\dilog \left (\frac {1}{2}+\frac {b x}{2}+\frac {a}{2}\right ) a}{b^{2}}+\frac {\ln \left (b x +a -1\right ) \ln \left (\frac {1}{2}+\frac {b x}{2}+\frac {a}{2}\right ) a}{2 b^{2}}+\frac {\ln \left (b x +a -1\right )^{2}}{8 b^{2}}-\frac {\ln \left (b x +a -1\right ) \ln \left (\frac {1}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{4 b^{2}}+\frac {\ln \left (b x +a +1\right )^{2} a}{4 b^{2}}-\frac {\ln \left (b x +a +1\right ) \ln \left (-\frac {b x}{2}-\frac {a}{2}+\frac {1}{2}\right ) a}{2 b^{2}}+\frac {\ln \left (-\frac {b x}{2}-\frac {a}{2}+\frac {1}{2}\right ) \ln \left (\frac {1}{2}+\frac {b x}{2}+\frac {a}{2}\right ) a}{2 b^{2}}+\frac {\ln \left (b x +a +1\right )^{2}}{8 b^{2}}-\frac {\ln \left (-\frac {b x}{2}-\frac {a}{2}+\frac {1}{2}\right ) \ln \left (b x +a +1\right )}{4 b^{2}}+\frac {\ln \left (-\frac {b x}{2}-\frac {a}{2}+\frac {1}{2}\right ) \ln \left (\frac {1}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{4 b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 202, normalized size = 1.49 \[ \frac {1}{2} \, x^{2} \operatorname {artanh}\left (b x + a\right )^{2} + \frac {1}{8} \, b^{2} {\left (\frac {8 \, {\left (\log \left (b x + a - 1\right ) \log \left (\frac {1}{2} \, b x + \frac {1}{2} \, a + \frac {1}{2}\right ) + {\rm Li}_2\left (-\frac {1}{2} \, b x - \frac {1}{2} \, a + \frac {1}{2}\right )\right )} a}{b^{4}} + \frac {4 \, {\left (a + 1\right )} \log \left (b x + a + 1\right )}{b^{4}} + \frac {{\left (a^{2} + 2 \, a + 1\right )} \log \left (b x + a + 1\right )^{2} - 2 \, {\left (a^{2} + 2 \, a + 1\right )} \log \left (b x + a + 1\right ) \log \left (b x + a - 1\right ) + {\left (a^{2} - 2 \, a + 1\right )} \log \left (b x + a - 1\right )^{2} - 4 \, {\left (a - 1\right )} \log \left (b x + a - 1\right )}{b^{4}}\right )} + \frac {1}{2} \, b {\left (\frac {2 \, x}{b^{2}} - \frac {{\left (a^{2} + 2 \, a + 1\right )} \log \left (b x + a + 1\right )}{b^{3}} + \frac {{\left (a^{2} - 2 \, a + 1\right )} \log \left (b x + a - 1\right )}{b^{3}}\right )} \operatorname {artanh}\left (b x + a\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int x\,{\mathrm {atanh}\left (a+b\,x\right )}^2 \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x \operatorname {atanh}^{2}{\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________